home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / ViePratique / ArchiFacile / ArchiFacileSetup.exe / {app} / nw.pak / Unnamed File 000107.txt < prev    next >
Text File  |  2014-10-14  |  9KB  |  306 lines

  1. /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2.  * Use of this source code is governed by a BSD-style license that can be
  3.  * found in the LICENSE file. */
  4.  
  5. /* This file defines styles for form controls. The order of rule blocks is
  6.  * important as there are some rules with equal specificity that rely on order
  7.  * as a tiebreaker. These are marked with OVERRIDE. */
  8.  
  9. /* Default state **************************************************************/
  10.  
  11. :-webkit-any(button,
  12.              input[type='button'],
  13.              input[type='submit']):not(.custom-appearance):not(.link-button),
  14. select,
  15. input[type='checkbox'],
  16. input[type='radio'] {
  17.   -webkit-appearance: none;
  18.   -webkit-user-select: none;
  19.   background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
  20.   border: 1px solid rgba(0, 0, 0, 0.25);
  21.   border-radius: 2px;
  22.   box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08),
  23.       inset 0 1px 2px rgba(255, 255, 255, 0.75);
  24.   color: #444;
  25.   font: inherit;
  26.   margin: 0 1px 0 0;
  27.   outline: none;
  28.   text-shadow: 0 1px 0 rgb(240, 240, 240);
  29. }
  30.  
  31. :-webkit-any(button,
  32.              input[type='button'],
  33.              input[type='submit']):not(.custom-appearance):not(.link-button),
  34. select {
  35.   min-height: 2em;
  36.   min-width: 4em;
  37. /* The following platform-specific rule is necessary to get adjacent
  38.    * buttons, text inputs, and so forth to align on their borders while also
  39.    * aligning on the text's baselines. */
  40.   padding-bottom: 1px;
  41. }
  42.  
  43. :-webkit-any(button,
  44.              input[type='button'],
  45.              input[type='submit']):not(.custom-appearance):not(.link-button) {
  46.   -webkit-padding-end: 10px;
  47.   -webkit-padding-start: 10px;
  48. }
  49.  
  50. select {
  51.   -webkit-appearance: none;
  52.   -webkit-padding-end: 20px;
  53.   -webkit-padding-start: 6px;
  54.   /* OVERRIDE */
  55.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAQAAACxSAwfAAAAUklEQVQY02P4z0AMRGZGMaShwCisyhITmb8huMzfEhOxKvuvsGAh208Ik+3ngoX/FbBbClcIUcSAw21QhXxfIIrwKAMpfNsEUYRXGVCEFc6CQwBqq4CCCtU4VgAAAABJRU5ErkJggg=='),
  56.       -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
  57.   background-position: right center;
  58.   background-repeat: no-repeat;
  59. }
  60.  
  61. html[dir='rtl'] select {
  62.   background-position: center left;
  63. }
  64.  
  65. input[type='checkbox'] {
  66.   bottom: 2px;
  67.   height: 13px;
  68.   position: relative;
  69.   vertical-align: middle;
  70.   width: 13px;
  71. }
  72.  
  73. input[type='radio'] {
  74.   /* OVERRIDE */
  75.   border-radius: 100%;
  76.   bottom: 3px;
  77.   height: 15px;
  78.   position: relative;
  79.   vertical-align: middle;
  80.   width: 15px;
  81. }
  82.  
  83. /* TODO(estade): add more types here? */
  84. input[type='number'],
  85. input[type='password'],
  86. input[type='search'],
  87. input[type='text'],
  88. input[type='url'],
  89. input:not([type]),
  90. textarea {
  91.   border: 1px solid #bfbfbf;
  92.   border-radius: 2px;
  93.   box-sizing: border-box;
  94.   color: #444;
  95.   font: inherit;
  96.   margin: 0;
  97.   /* Use min-height to accommodate addditional padding for touch as needed. */
  98.   min-height: 2em;
  99.   padding: 3px;
  100.   outline: none;
  101. /* For better alignment between adjacent buttons and inputs. */
  102.   padding-bottom: 4px;
  103. }
  104.  
  105. input[type='search'] {
  106.   -webkit-appearance: textfield;
  107.   /* NOTE: Keep a relatively high min-width for this so we don't obscure the end
  108.    * of the default text in relatively spacious languages (i.e. German). */
  109.   min-width: 160px;
  110. }
  111.  
  112. /* Remove when https://bugs.webkit.org/show_bug.cgi?id=51499 is fixed.
  113.  * TODO(dbeam): are there more types that would benefit from this? */
  114. input[type='search']::-webkit-textfield-decoration-container {
  115.   direction: inherit;
  116. }
  117.  
  118. /* Checked ********************************************************************/
  119.  
  120. input[type='checkbox']:checked::before {
  121.   -webkit-user-select: none;
  122.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAQAAAADpb+tAAAAaElEQVR4Xl3PIQoCQQCF4Y8JW42D1bDZ4iVEjDbxFpstYhC7eIVBZHkXFGw734sv/TqDQQ8Xb1udja/I8igeIm7Aygj2IpoKTGZnVRNxAHYi4iPiDlA9xX+aNQDFySziqDN6uSp6y7ofEMwZ05uUZRkAAAAASUVORK5CYII=');
  123.   background-size: 100% 100%;
  124.   content: '';
  125.   display: block;
  126.   height: 100%;
  127.   width: 100%;
  128. }
  129.  
  130. input[type='radio']:checked::before {
  131.   background-color: #666;
  132.   border-radius: 100%;
  133.   bottom: 3px;
  134.   content: '';
  135.   display: block;
  136.   left: 3px;
  137.   position: absolute;
  138.   right: 3px;
  139.   top: 3px;
  140. }
  141.  
  142. /* Hover **********************************************************************/
  143.  
  144. :enabled:hover:-webkit-any(
  145.     select,
  146.     input[type='checkbox'],
  147.     input[type='radio'],
  148.     :-webkit-any(
  149.         button,
  150.         input[type='button'],
  151.         input[type='submit']):not(.custom-appearance):not(.link-button)) {
  152.   background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
  153.   border-color: rgba(0, 0, 0, 0.3);
  154.   box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12),
  155.       inset 0 1px 2px rgba(255, 255, 255, 0.95);
  156.   color: black;
  157. }
  158.  
  159. :enabled:hover:-webkit-any(select) {
  160.   /* OVERRIDE */
  161.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAQAAACxSAwfAAAAUklEQVQY02P4z0AMRGZGMaShwCisyhITmb8huMzfEhOxKvuvsGAh208Ik+3ngoX/FbBbClcIUcSAw21QhXxfIIrwKAMpfNsEUYRXGVCEFc6CQwBqq4CCCtU4VgAAAABJRU5ErkJggg=='),
  162.       -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
  163. }
  164.  
  165. /* Active *********************************************************************/
  166.  
  167. :enabled:active:-webkit-any(
  168.     select,
  169.     input[type='checkbox'],
  170.     input[type='radio'],
  171.     :-webkit-any(
  172.         button,
  173.         input[type='button'],
  174.         input[type='submit']):not(.custom-appearance):not(.link-button)) {
  175.   background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
  176.   box-shadow: none;
  177.   text-shadow: none;
  178. }
  179.  
  180. :enabled:active:-webkit-any(select) {
  181.   /* OVERRIDE */
  182.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAQAAACxSAwfAAAAUklEQVQY02P4z0AMRGZGMaShwCisyhITmb8huMzfEhOxKvuvsGAh208Ik+3ngoX/FbBbClcIUcSAw21QhXxfIIrwKAMpfNsEUYRXGVCEFc6CQwBqq4CCCtU4VgAAAABJRU5ErkJggg=='),
  183.       -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
  184. }
  185.  
  186. /* Disabled *******************************************************************/
  187.  
  188. :disabled:-webkit-any(
  189.     button,
  190.     input[type='button'],
  191.     input[type='submit']):not(.custom-appearance):not(.link-button),
  192. select:disabled {
  193.   background-image: -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
  194.   border-color: rgba(80, 80, 80, 0.2);
  195.   box-shadow: 0 1px 0 rgba(80, 80, 80, 0.08),
  196.       inset 0 1px 2px rgba(255, 255, 255, 0.75);
  197.   color: #aaa;
  198. }
  199.  
  200. select:disabled {
  201.   /* OVERRIDE */
  202.   background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAICAQAAACxSAwfAAAASklEQVQY02P4z0AMRGZGMaShwCisyhITG/4jw8RErMr+KyxYiFC0YOF/BeyWIikEKWLA4Ta4QogiPMpACt82QRThVQYUYYWz4BAAGr6Ii6kEPacAAAAASUVORK5CYII='),
  203.       -webkit-linear-gradient(#f1f1f1, #f1f1f1 38%, #e6e6e6);
  204. }
  205.  
  206. input:disabled:-webkit-any([type='checkbox'],
  207.                            [type='radio']) {
  208.   opacity: .75;
  209. }
  210.  
  211. input:disabled:-webkit-any([type='password'],
  212.                            [type='search'],
  213.                            [type='text'],
  214.                            [type='url'],
  215.                            :not([type])) {
  216.   color: #999;
  217. }
  218.  
  219. /* Focus **********************************************************************/
  220.  
  221. :enabled:focus:-webkit-any(
  222.     select,
  223.     input[type='checkbox'],
  224.     input[type='number'],
  225.     input[type='password'],
  226.     input[type='radio'],
  227.     input[type='search'],
  228.     input[type='text'],
  229.     input[type='url'],
  230.     input:not([type]),
  231.     :-webkit-any(
  232.          button,
  233.          input[type='button'],
  234.          input[type='submit']):not(.custom-appearance):not(.link-button)) {
  235.   /* OVERRIDE */
  236.   -webkit-transition: border-color 200ms;
  237.   /* We use border color because it follows the border radius (unlike outline).
  238.    * This is particularly noticeable on mac. */
  239.   border-color: rgb(77, 144, 254);
  240.   outline: none;
  241. }
  242.  
  243. /* Link buttons ***************************************************************/
  244.  
  245. .link-button {
  246.   -webkit-box-shadow: none;
  247.   background: transparent none;
  248.   border: none;
  249.   color: rgb(17, 85, 204);
  250.   cursor: pointer;
  251.   /* Input elements have -webkit-small-control which can override the body font.
  252.    * Resolve this by using 'inherit'. */
  253.   font: inherit;
  254.   margin: 0;
  255.   padding: 0 4px;
  256. }
  257.  
  258. .link-button:hover {
  259.   text-decoration: underline;
  260. }
  261.  
  262. .link-button:active {
  263.   color: rgb(5, 37, 119);
  264.   text-decoration: underline;
  265. }
  266.  
  267. .link-button[disabled] {
  268.   color: #999;
  269.   cursor: default;
  270.   text-decoration: none;
  271. }
  272.  
  273. /* Checkbox/radio helpers ******************************************************
  274.  *
  275.  * .checkbox and .radio classes wrap labels. Checkboxes and radios should use
  276.  * these classes with the markup structure:
  277.  *
  278.  *   <div class="checkbox">
  279.  *     <label>
  280.  *       <input type="checkbox"></input>
  281.  *       <span>
  282.  *     </label>
  283.  *   </div>
  284.  */
  285.  
  286. :-webkit-any(.checkbox, .radio) label {
  287.   /* Don't expand horizontally: <http://crbug.com/112091>. */
  288.   display: -webkit-inline-box;
  289.   padding-bottom: 7px;
  290.   padding-top: 7px;
  291. }
  292.  
  293. :-webkit-any(.checkbox, .radio) label input ~ span {
  294.   -webkit-margin-start: 0.6em;
  295.   /* Make sure long spans wrap at the same horizontal position they start. */
  296.   display: block;
  297. }
  298.  
  299. :-webkit-any(.checkbox, .radio) label:hover {
  300.   color: black;
  301. }
  302.  
  303. label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span {
  304.   color: #999;
  305. }
  306.